﻿using System;
using ScrewTurn.Wiki;
using System.Data.SqlClient;
using System.Data;
using System.Web.UI.WebControls;
using System.Text;


public partial class UltimateTestPage : BasePage
{
	protected void Page_Load(object sender, EventArgs e)
	{
		#region Verify Authentication
		//// Re-verify authentication
		//PageInfo pageInfo = Pages.Instance.FindPage(Request["Page"]);
		//if (pageInfo == null)
		//{
		//    // Page creation
		//    if (SessionFacade.LoginKey == null && !Settings.PublicAccess)
		//    {
		//        Response.Redirect("Login.aspx?Redirect=NMRGen.aspx");
		//    }
		//    if (!Settings.UsersCanCreateNewPages && !SessionFacade.Admin)
		//    {
		//        Response.Redirect("AccessDenied.aspx");
		//    }
		//}
		//else
		//{
		//    // Page modification
		//    if (pageInfo.Provider.ReadOnly) Response.Redirect(pageInfo.Name + Settings.PageExtension);

		//    if (pageInfo.Status == PageStatus.Locked)
		//    {
		//        if (SessionFacade.LoginKey == null || (SessionFacade.LoginKey != null && (SessionFacade.LoginKey == null || !SessionFacade.Admin)))
		//        {
		//            Response.Redirect("AccessDenied.aspx");
		//        }
		//    }

		//    // Login/Authorization check
		//    if (SessionFacade.LoginKey == null && !Settings.PublicAccess && pageInfo.Status != PageStatus.Public)
		//    {
		//        Response.Redirect("Login.aspx?Redirect=" + Tools.UrlEncode(Request.Url.ToString().Substring(Request.Url.ToString().ToLowerInvariant().IndexOf("NMRGen.aspx"))));
		//    }
		//    if ((Settings.PublicAccess || pageInfo.Status == PageStatus.Public) && SessionFacade.LoginKey == null)
		//    {
		//        //lblIpLogged.Visible = true;
		//    }
		//}
		#endregion
		
	}
}
